package com.ourteam.system.dao;

import net.dao.BaseQueryBean;
import net.dao.BaseWhereCriterion;
import net.dao.IDataAccessInterface;

import org.apache.commons.lang.StringUtils;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


/**
 * Template Name : DAO查询对象
 * Template Version : 1
 * Template Last Modfiy Date : Sat Aug 19 10:06:32 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:29
  * Warning ! This file will be overwrite when regenerate !
  *
 */
public class SysUserRoleRelateDAOQueryBean extends BaseQueryBean {
    public SysUserRoleRelateDAOQueryBean() {
        super();
    }

    public SysUserRoleRelateDAOQueryBean(BaseQueryBean aQueryBean) {
        super(aQueryBean);
    }

    public SysUserRoleRelateDAOQueryBean(BaseQueryBean aQueryBean,
        Map tableReplaceMap) {
        super(aQueryBean, tableReplaceMap);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();

        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }

        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        return new Criteria(this);
    }

    public void addIdSelectProperty() {
        addIdSelectProperty("id");
    }

    public void addIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.Id, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.Id, "id");
        }
    }

    public void addExpiredDateSelectProperty() {
        addExpiredDateSelectProperty("expiredDate");
    }

    public void addExpiredDateSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.ExpiredDate, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.ExpiredDate, "expiredDate");
        }
    }

    public void addRemarksSelectProperty() {
        addRemarksSelectProperty("remarks");
    }

    public void addRemarksSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.Remarks, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.Remarks, "remarks");
        }
    }

    public void addRoleIdSelectProperty() {
        addRoleIdSelectProperty("roleId");
    }

    public void addRoleIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.RoleId, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.RoleId, "roleId");
        }
    }

    public void addStatusSelectProperty() {
        addStatusSelectProperty("status");
    }

    public void addStatusSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.Status, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.Status, "status");
        }
    }

    public void addUserIdSelectProperty() {
        addUserIdSelectProperty("userId");
    }

    public void addUserIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.UserId, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.UserId, "userId");
        }
    }

    public void addRoleCodeSelectProperty() {
        addRoleCodeSelectProperty("roleCode");
    }

    public void addRoleCodeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.RoleCode, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.RoleCode, "roleCode");
        }
    }

    public void addRoleNameSelectProperty() {
        addRoleNameSelectProperty("roleName");
    }

    public void addRoleNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.RoleName, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.RoleName, "roleName");
        }
    }

    public void addRoleTypeSelectProperty() {
        addRoleTypeSelectProperty("roleType");
    }

    public void addRoleTypeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.RoleType, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.RoleType, "roleType");
        }
    }

    public void addDomainIdSelectProperty() {
        addDomainIdSelectProperty("domainId");
    }

    public void addDomainIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.DomainId, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.DomainId, "domainId");
        }
    }

    public void addDomainNameSelectProperty() {
        addDomainNameSelectProperty("domainName");
    }

    public void addDomainNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.DomainName, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.DomainName, "domainName");
        }
    }

    public void addDomainCodeSelectProperty() {
        addDomainCodeSelectProperty("domainCode");
    }

    public void addDomainCodeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysUserRoleRelateDAO.DomainCode, aAlias);
        } else {
            addSelectProperty(ISysUserRoleRelateDAO.DomainCode, "domainCode");
        }
    }

    public void addAllSelectProperties() {
        addIdSelectProperty();

        addExpiredDateSelectProperty();

        addRemarksSelectProperty();

        addRoleIdSelectProperty();

        addStatusSelectProperty();

        addUserIdSelectProperty();

        addRoleCodeSelectProperty();

        addRoleNameSelectProperty();

        addRoleTypeSelectProperty();

        addDomainIdSelectProperty();

        addDomainNameSelectProperty();

        addDomainCodeSelectProperty();
    }

    public static class Criteria extends BaseWhereCriterion<SysUserRoleRelateDAOQueryBean> {
        protected Criteria(SysUserRoleRelateDAOQueryBean aParentObject) {
            super(aParentObject);
        }

        public Criteria andIdIsNull() {
            addCriterion(ISysUserRoleRelateDAO.Id + " is null");

            return this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.Id + " is not null");

            return this;
        }

        public Criteria andIdIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.Id + " is not null AND " +
                ISysUserRoleRelateDAO.Id + " <> ''");

            return this;
        }

        public Criteria andIdIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.Id + " is null OR " +
                ISysUserRoleRelateDAO.Id + " = '')");

            return this;
        }

        public Criteria andIdEqualTo(long value) {
            return andIdEqualTo(Long.valueOf(value));
        }

        public Criteria andIdEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.Id + " = ", value, "id");

            return this;
        }

        public Criteria andIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Id);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Id + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdNotEqualTo(long value) {
            return andIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToOrIsNull(long value) {
            return andIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.Id + " is null OR " +
                ISysUserRoleRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Id);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Id + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdGreaterThan(long value) {
            return andIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.Id + " >", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Id);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Id + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(long value) {
            return andIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.Id + " >=", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Id);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Id + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdLessThan(long value) {
            return andIdLessThan(Long.valueOf(value));
        }

        public Criteria andIdLessThan(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.Id + " <", value, "id");

            return this;
        }

        public Criteria andIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Id);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Id + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(long value) {
            return andIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.Id + " <=", value, "id");

            return this;
        }

        public Criteria andIdLessThanOrEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Id);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Id + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdIn(long[] values) {
            if (values.length == 1) {
                return andIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.Id + " not in", values, "id");

                return this;
            }
        }

        public Criteria andIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.Id + " not in", values, "id");

                return this;
            }
        }

        public Criteria andIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.Id + " in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.Id + " not in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Id + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Id + " not in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdBetween(long value1, long value2) {
            addCriterion(ISysUserRoleRelateDAO.Id + " between", value1, value2,
                "id");

            return this;
        }

        public Criteria andIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserRoleRelateDAO.Id + " between", value1, value2,
                "id");

            return this;
        }

        public Criteria andIdNotBetween(long value1, long value2) {
            addCriterion(ISysUserRoleRelateDAO.Id + " not between", value1,
                value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserRoleRelateDAO.Id + " not between", value1,
                value2, "id");

            return this;
        }

        public Criteria andExpiredDateIsNull() {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " is null");

            return this;
        }

        public Criteria andExpiredDateIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " is not null");

            return this;
        }

        public Criteria andExpiredDateIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate +
                " is not null AND " + ISysUserRoleRelateDAO.ExpiredDate +
                " <> ''");

            return this;
        }

        public Criteria andExpiredDateIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.ExpiredDate +
                " is null OR " + ISysUserRoleRelateDAO.ExpiredDate + " = '')");

            return this;
        }

        public Criteria andExpiredDateEqualTo(java.util.Date value) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate + " = ",
                value, "expiredDate");

            return this;
        }

        public Criteria andExpiredDateEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.ExpiredDate);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andExpiredDateEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andExpiredDateNotEqualTo(java.util.Date value) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate + " <>",
                value, "expiredDate");

            return this;
        }

        public Criteria andExpiredDateNotEqualToOrIsNull(java.util.Date value) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate +
                " is null OR " + ISysUserRoleRelateDAO.ExpiredDate + " <>",
                value, "expiredDate");

            return this;
        }

        public Criteria andExpiredDateNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.ExpiredDate);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andExpiredDateNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andExpiredDateGreaterThan(java.util.Date value) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate + " >",
                value, "expiredDate");

            return this;
        }

        public Criteria andExpiredDateGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.ExpiredDate);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andExpiredDateGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andExpiredDateGreaterThanOrEqualTo(java.util.Date value) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate + " >=",
                value, "expiredDate");

            return this;
        }

        public Criteria andExpiredDateGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.ExpiredDate);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andExpiredDateGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andExpiredDateLessThan(java.util.Date value) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate + " <",
                value, "expiredDate");

            return this;
        }

        public Criteria andExpiredDateLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.ExpiredDate);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andExpiredDateLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andExpiredDateLessThanOrEqualTo(java.util.Date value) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate + " <=",
                value, "expiredDate");

            return this;
        }

        public Criteria andExpiredDateLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.ExpiredDate);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andExpiredDateLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andExpiredDateIn(List<java.util.Date> values) {
            if (values.size() == 1) {
                return andExpiredDateEqualTo(values.get(0));
            } else {
                addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate +
                    " in", values, "expiredDate");

                return this;
            }
        }

        public Criteria andExpiredDateNotIn(List<java.util.Date> values) {
            if (values.size() == 1) {
                return andExpiredDateNotEqualTo(values.get(0));
            } else {
                addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate +
                    " not in", values, "expiredDate");

                return this;
            }
        }

        public Criteria andExpiredDateIn(java.util.Date[] values) {
            if (values.length == 1) {
                return andExpiredDateEqualTo(values[0]);
            } else {
                addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate +
                    " in", Arrays.asList(values), "expiredDate");

                return this;
            }
        }

        public Criteria andExpiredDateNotIn(java.util.Date[] values) {
            if (values.length == 1) {
                return andExpiredDateNotEqualTo(values[0]);
            } else {
                addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate +
                    " not in", Arrays.asList(values), "expiredDate");

                return this;
            }
        }

        public Criteria andExpiredDateIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andExpiredDateNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.ExpiredDate + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andExpiredDateBetween(java.util.Date value1,
            java.util.Date value2) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate +
                " between", value1, value2, "expiredDate");

            return this;
        }

        public Criteria andExpiredDateNotBetween(java.util.Date value1,
            java.util.Date value2) {
            addCriterionForJDBCDate(ISysUserRoleRelateDAO.ExpiredDate +
                " not between", value1, value2, "expiredDate");

            return this;
        }

        public Criteria andRemarksIsNull() {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " is null");

            return this;
        }

        public Criteria andRemarksIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " is not null");

            return this;
        }

        public Criteria andRemarksIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " is not null AND " +
                ISysUserRoleRelateDAO.Remarks + " <> ''");

            return this;
        }

        public Criteria andRemarksIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.Remarks + " is null OR " +
                ISysUserRoleRelateDAO.Remarks + " = '')");

            return this;
        }

        public Criteria andRemarksEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " = ", value, "remarks");

            return this;
        }

        public Criteria andRemarksEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Remarks);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksNotEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " <>", value, "remarks");

            return this;
        }

        public Criteria andRemarksNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " is null OR " +
                ISysUserRoleRelateDAO.Remarks + " <>", value, "remarks");

            return this;
        }

        public Criteria andRemarksNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Remarks);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksGreaterThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " >", value, "remarks");

            return this;
        }

        public Criteria andRemarksGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Remarks);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " >=", value, "remarks");

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Remarks);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksLessThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " <", value, "remarks");

            return this;
        }

        public Criteria andRemarksLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Remarks);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksLessThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " <=", value, "remarks");

            return this;
        }

        public Criteria andRemarksLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Remarks);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.Remarks + " like",
                buffer.toString(), "remarks");

            return this;
        }

        public Criteria andRemarksNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.Remarks + " not like",
                buffer.toString(), "remarks");

            return this;
        }

        public Criteria andRemarksIn(List<String> values) {
            if (values.size() == 1) {
                return andRemarksEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.Remarks + " in", values,
                    "remarks");

                return this;
            }
        }

        public Criteria andRemarksNotIn(List<String> values) {
            if (values.size() == 1) {
                return andRemarksNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.Remarks + " not in", values,
                    "remarks");

                return this;
            }
        }

        public Criteria andRemarksIn(String[] values) {
            if (values.length == 1) {
                return andRemarksEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.Remarks + " in",
                    Arrays.asList(values), "remarks");

                return this;
            }
        }

        public Criteria andRemarksNotIn(String[] values) {
            if (values.length == 1) {
                return andRemarksNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.Remarks + " not in",
                    Arrays.asList(values), "remarks");

                return this;
            }
        }

        public Criteria andRemarksIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " between", value1,
                value2, "remarks");

            return this;
        }

        public Criteria andRemarksNotBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.Remarks + " not between",
                value1, value2, "remarks");

            return this;
        }

        public Criteria andRoleIdIsNull() {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " is null");

            return this;
        }

        public Criteria andRoleIdIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " is not null");

            return this;
        }

        public Criteria andRoleIdIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " is not null AND " +
                ISysUserRoleRelateDAO.RoleId + " <> ''");

            return this;
        }

        public Criteria andRoleIdIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.RoleId + " is null OR " +
                ISysUserRoleRelateDAO.RoleId + " = '')");

            return this;
        }

        public Criteria andRoleIdEqualTo(long value) {
            return andRoleIdEqualTo(Long.valueOf(value));
        }

        public Criteria andRoleIdEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " = ", value, "roleId");

            return this;
        }

        public Criteria andRoleIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andRoleIdNotEqualTo(long value) {
            return andRoleIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andRoleIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " <>", value, "roleId");

            return this;
        }

        public Criteria andRoleIdNotEqualToOrIsNull(long value) {
            return andRoleIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andRoleIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " is null OR " +
                ISysUserRoleRelateDAO.RoleId + " <>", value, "roleId");

            return this;
        }

        public Criteria andRoleIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdGreaterThan(long value) {
            return andRoleIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andRoleIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " >", value, "roleId");

            return this;
        }

        public Criteria andRoleIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andRoleIdGreaterThanOrEqualTo(long value) {
            return andRoleIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andRoleIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " >=", value, "roleId");

            return this;
        }

        public Criteria andRoleIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdLessThan(long value) {
            return andRoleIdLessThan(Long.valueOf(value));
        }

        public Criteria andRoleIdLessThan(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " <", value, "roleId");

            return this;
        }

        public Criteria andRoleIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andRoleIdLessThanOrEqualTo(long value) {
            return andRoleIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andRoleIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " <=", value, "roleId");

            return this;
        }

        public Criteria andRoleIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdIn(long[] values) {
            if (values.length == 1) {
                return andRoleIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleId + " in", values,
                    "roleId");

                return this;
            }
        }

        public Criteria andRoleIdNotIn(long[] values) {
            if (values.length == 1) {
                return andRoleIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleId + " not in", values,
                    "roleId");

                return this;
            }
        }

        public Criteria andRoleIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andRoleIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleId + " in", values,
                    "roleId");

                return this;
            }
        }

        public Criteria andRoleIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andRoleIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleId + " not in", values,
                    "roleId");

                return this;
            }
        }

        public Criteria andRoleIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andRoleIdEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleId + " in",
                    Arrays.asList(values), "roleId");

                return this;
            }
        }

        public Criteria andRoleIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andRoleIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleId + " not in",
                    Arrays.asList(values), "roleId");

                return this;
            }
        }

        public Criteria andRoleIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRoleIdBetween(long value1, long value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " between", value1,
                value2, "roleId");

            return this;
        }

        public Criteria andRoleIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " between", value1,
                value2, "roleId");

            return this;
        }

        public Criteria andRoleIdNotBetween(long value1, long value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " not between", value1,
                value2, "roleId");

            return this;
        }

        public Criteria andRoleIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleId + " not between", value1,
                value2, "roleId");

            return this;
        }

        public Criteria andStatusIsNull() {
            addCriterion(ISysUserRoleRelateDAO.Status + " is null");

            return this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.Status + " is not null");

            return this;
        }

        public Criteria andStatusIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.Status + " is not null AND " +
                ISysUserRoleRelateDAO.Status + " <> ''");

            return this;
        }

        public Criteria andStatusIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.Status + " is null OR " +
                ISysUserRoleRelateDAO.Status + " = '')");

            return this;
        }

        public Criteria andStatusEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.Status + " = ", value, "status");

            return this;
        }

        public Criteria andStatusEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Status);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Status + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserRoleRelateDAO.Status + " is null OR " +
                ISysUserRoleRelateDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Status);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Status + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusGreaterThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.Status + " >", value, "status");

            return this;
        }

        public Criteria andStatusGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Status);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Status + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.Status + " >=", value, "status");

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Status);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Status + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusLessThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.Status + " <", value, "status");

            return this;
        }

        public Criteria andStatusLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Status);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Status + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.Status + " <=", value, "status");

            return this;
        }

        public Criteria andStatusLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.Status);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Status + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.Status + " like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.Status + " not like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.Status + " in", values,
                    "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.Status + " not in", values,
                    "status");

                return this;
            }
        }

        public Criteria andStatusIn(String[] values) {
            if (values.length == 1) {
                return andStatusEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.Status + " in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(String[] values) {
            if (values.length == 1) {
                return andStatusNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.Status + " not in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Status + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.Status + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.Status + " between", value1,
                value2, "status");

            return this;
        }

        public Criteria andStatusNotBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.Status + " not between", value1,
                value2, "status");

            return this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion(ISysUserRoleRelateDAO.UserId + " is null");

            return this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.UserId + " is not null");

            return this;
        }

        public Criteria andUserIdIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.UserId + " is not null AND " +
                ISysUserRoleRelateDAO.UserId + " <> ''");

            return this;
        }

        public Criteria andUserIdIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.UserId + " is null OR " +
                ISysUserRoleRelateDAO.UserId + " = '')");

            return this;
        }

        public Criteria andUserIdEqualTo(long value) {
            return andUserIdEqualTo(Long.valueOf(value));
        }

        public Criteria andUserIdEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " = ", value, "userId");

            return this;
        }

        public Criteria andUserIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.UserId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andUserIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andUserIdNotEqualTo(long value) {
            return andUserIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andUserIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " <>", value, "userId");

            return this;
        }

        public Criteria andUserIdNotEqualToOrIsNull(long value) {
            return andUserIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andUserIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " is null OR " +
                ISysUserRoleRelateDAO.UserId + " <>", value, "userId");

            return this;
        }

        public Criteria andUserIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.UserId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andUserIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andUserIdGreaterThan(long value) {
            return andUserIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andUserIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " >", value, "userId");

            return this;
        }

        public Criteria andUserIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.UserId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andUserIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(long value) {
            return andUserIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andUserIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " >=", value, "userId");

            return this;
        }

        public Criteria andUserIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.UserId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andUserIdLessThan(long value) {
            return andUserIdLessThan(Long.valueOf(value));
        }

        public Criteria andUserIdLessThan(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " <", value, "userId");

            return this;
        }

        public Criteria andUserIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.UserId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andUserIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andUserIdLessThanOrEqualTo(long value) {
            return andUserIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andUserIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " <=", value, "userId");

            return this;
        }

        public Criteria andUserIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.UserId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andUserIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andUserIdIn(long[] values) {
            if (values.length == 1) {
                return andUserIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.UserId + " in", values,
                    "userId");

                return this;
            }
        }

        public Criteria andUserIdNotIn(long[] values) {
            if (values.length == 1) {
                return andUserIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.UserId + " not in", values,
                    "userId");

                return this;
            }
        }

        public Criteria andUserIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andUserIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.UserId + " in", values,
                    "userId");

                return this;
            }
        }

        public Criteria andUserIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andUserIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.UserId + " not in", values,
                    "userId");

                return this;
            }
        }

        public Criteria andUserIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andUserIdEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.UserId + " in",
                    Arrays.asList(values), "userId");

                return this;
            }
        }

        public Criteria andUserIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andUserIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.UserId + " not in",
                    Arrays.asList(values), "userId");

                return this;
            }
        }

        public Criteria andUserIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andUserIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andUserIdBetween(long value1, long value2) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " between", value1,
                value2, "userId");

            return this;
        }

        public Criteria andUserIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " between", value1,
                value2, "userId");

            return this;
        }

        public Criteria andUserIdNotBetween(long value1, long value2) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " not between", value1,
                value2, "userId");

            return this;
        }

        public Criteria andUserIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserRoleRelateDAO.UserId + " not between", value1,
                value2, "userId");

            return this;
        }

        public Criteria andRoleCodeIsNull() {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " is null");

            return this;
        }

        public Criteria andRoleCodeIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " is not null");

            return this;
        }

        public Criteria andRoleCodeIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " is not null AND " +
                ISysUserRoleRelateDAO.RoleCode + " <> ''");

            return this;
        }

        public Criteria andRoleCodeIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.RoleCode + " is null OR " +
                ISysUserRoleRelateDAO.RoleCode + " = '')");

            return this;
        }

        public Criteria andRoleCodeEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " = ", value,
                "roleCode");

            return this;
        }

        public Criteria andRoleCodeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleCode);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleCodeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleCodeNotEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " <>", value,
                "roleCode");

            return this;
        }

        public Criteria andRoleCodeNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " is null OR " +
                ISysUserRoleRelateDAO.RoleCode + " <>", value, "roleCode");

            return this;
        }

        public Criteria andRoleCodeNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleCode);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleCodeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleCodeGreaterThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " >", value,
                "roleCode");

            return this;
        }

        public Criteria andRoleCodeGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleCode);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleCodeGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleCodeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " >=", value,
                "roleCode");

            return this;
        }

        public Criteria andRoleCodeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleCode);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleCodeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleCodeLessThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " <", value,
                "roleCode");

            return this;
        }

        public Criteria andRoleCodeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleCode);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleCodeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleCodeLessThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " <=", value,
                "roleCode");

            return this;
        }

        public Criteria andRoleCodeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleCode);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleCodeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleCodeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " like",
                buffer.toString(), "roleCode");

            return this;
        }

        public Criteria andRoleCodeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " not like",
                buffer.toString(), "roleCode");

            return this;
        }

        public Criteria andRoleCodeIn(List<String> values) {
            if (values.size() == 1) {
                return andRoleCodeEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleCode + " in", values,
                    "roleCode");

                return this;
            }
        }

        public Criteria andRoleCodeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andRoleCodeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleCode + " not in",
                    values, "roleCode");

                return this;
            }
        }

        public Criteria andRoleCodeIn(String[] values) {
            if (values.length == 1) {
                return andRoleCodeEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleCode + " in",
                    Arrays.asList(values), "roleCode");

                return this;
            }
        }

        public Criteria andRoleCodeNotIn(String[] values) {
            if (values.length == 1) {
                return andRoleCodeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleCode + " not in",
                    Arrays.asList(values), "roleCode");

                return this;
            }
        }

        public Criteria andRoleCodeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleCodeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRoleCodeBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " between", value1,
                value2, "roleCode");

            return this;
        }

        public Criteria andRoleCodeNotBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleCode + " not between",
                value1, value2, "roleCode");

            return this;
        }

        public Criteria andRoleNameIsNull() {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " is null");

            return this;
        }

        public Criteria andRoleNameIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " is not null");

            return this;
        }

        public Criteria andRoleNameIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " is not null AND " +
                ISysUserRoleRelateDAO.RoleName + " <> ''");

            return this;
        }

        public Criteria andRoleNameIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.RoleName + " is null OR " +
                ISysUserRoleRelateDAO.RoleName + " = '')");

            return this;
        }

        public Criteria andRoleNameEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " = ", value,
                "roleName");

            return this;
        }

        public Criteria andRoleNameEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleNameEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleNameNotEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " <>", value,
                "roleName");

            return this;
        }

        public Criteria andRoleNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " is null OR " +
                ISysUserRoleRelateDAO.RoleName + " <>", value, "roleName");

            return this;
        }

        public Criteria andRoleNameNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleNameNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleNameGreaterThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " >", value,
                "roleName");

            return this;
        }

        public Criteria andRoleNameGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleNameGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleNameGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " >=", value,
                "roleName");

            return this;
        }

        public Criteria andRoleNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleNameLessThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " <", value,
                "roleName");

            return this;
        }

        public Criteria andRoleNameLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleNameLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleNameLessThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " <=", value,
                "roleName");

            return this;
        }

        public Criteria andRoleNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.RoleName + " like",
                buffer.toString(), "roleName");

            return this;
        }

        public Criteria andRoleNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.RoleName + " not like",
                buffer.toString(), "roleName");

            return this;
        }

        public Criteria andRoleNameIn(List<String> values) {
            if (values.size() == 1) {
                return andRoleNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleName + " in", values,
                    "roleName");

                return this;
            }
        }

        public Criteria andRoleNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andRoleNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleName + " not in",
                    values, "roleName");

                return this;
            }
        }

        public Criteria andRoleNameIn(String[] values) {
            if (values.length == 1) {
                return andRoleNameEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleName + " in",
                    Arrays.asList(values), "roleName");

                return this;
            }
        }

        public Criteria andRoleNameNotIn(String[] values) {
            if (values.length == 1) {
                return andRoleNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleName + " not in",
                    Arrays.asList(values), "roleName");

                return this;
            }
        }

        public Criteria andRoleNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleNameNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRoleNameBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " between", value1,
                value2, "roleName");

            return this;
        }

        public Criteria andRoleNameNotBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleName + " not between",
                value1, value2, "roleName");

            return this;
        }

        public Criteria andRoleTypeIsNull() {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " is null");

            return this;
        }

        public Criteria andRoleTypeIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " is not null");

            return this;
        }

        public Criteria andRoleTypeIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " is not null AND " +
                ISysUserRoleRelateDAO.RoleType + " <> ''");

            return this;
        }

        public Criteria andRoleTypeIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.RoleType + " is null OR " +
                ISysUserRoleRelateDAO.RoleType + " = '')");

            return this;
        }

        public Criteria andRoleTypeEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " = ", value,
                "roleType");

            return this;
        }

        public Criteria andRoleTypeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleType);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleTypeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleTypeNotEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " <>", value,
                "roleType");

            return this;
        }

        public Criteria andRoleTypeNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " is null OR " +
                ISysUserRoleRelateDAO.RoleType + " <>", value, "roleType");

            return this;
        }

        public Criteria andRoleTypeNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleType);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleTypeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleTypeGreaterThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " >", value,
                "roleType");

            return this;
        }

        public Criteria andRoleTypeGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleType);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleTypeGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleTypeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " >=", value,
                "roleType");

            return this;
        }

        public Criteria andRoleTypeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleType);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleTypeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleTypeLessThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " <", value,
                "roleType");

            return this;
        }

        public Criteria andRoleTypeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleType);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleTypeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleTypeLessThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " <=", value,
                "roleType");

            return this;
        }

        public Criteria andRoleTypeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.RoleType);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleTypeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleTypeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.RoleType + " like",
                buffer.toString(), "roleType");

            return this;
        }

        public Criteria andRoleTypeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.RoleType + " not like",
                buffer.toString(), "roleType");

            return this;
        }

        public Criteria andRoleTypeIn(List<String> values) {
            if (values.size() == 1) {
                return andRoleTypeEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleType + " in", values,
                    "roleType");

                return this;
            }
        }

        public Criteria andRoleTypeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andRoleTypeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleType + " not in",
                    values, "roleType");

                return this;
            }
        }

        public Criteria andRoleTypeIn(String[] values) {
            if (values.length == 1) {
                return andRoleTypeEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleType + " in",
                    Arrays.asList(values), "roleType");

                return this;
            }
        }

        public Criteria andRoleTypeNotIn(String[] values) {
            if (values.length == 1) {
                return andRoleTypeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.RoleType + " not in",
                    Arrays.asList(values), "roleType");

                return this;
            }
        }

        public Criteria andRoleTypeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleTypeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRoleTypeBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " between", value1,
                value2, "roleType");

            return this;
        }

        public Criteria andRoleTypeNotBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.RoleType + " not between",
                value1, value2, "roleType");

            return this;
        }

        public Criteria andDomainIdIsNull() {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " is null");

            return this;
        }

        public Criteria andDomainIdIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " is not null");

            return this;
        }

        public Criteria andDomainIdIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " is not null AND " +
                ISysUserRoleRelateDAO.DomainId + " <> ''");

            return this;
        }

        public Criteria andDomainIdIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.DomainId + " is null OR " +
                ISysUserRoleRelateDAO.DomainId + " = '')");

            return this;
        }

        public Criteria andDomainIdEqualTo(long value) {
            return andDomainIdEqualTo(Long.valueOf(value));
        }

        public Criteria andDomainIdEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " = ", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDomainIdNotEqualTo(long value) {
            return andDomainIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andDomainIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " <>", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdNotEqualToOrIsNull(long value) {
            return andDomainIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andDomainIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " is null OR " +
                ISysUserRoleRelateDAO.DomainId + " <>", value, "domainId");

            return this;
        }

        public Criteria andDomainIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDomainIdGreaterThan(long value) {
            return andDomainIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andDomainIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " >", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDomainIdGreaterThanOrEqualTo(long value) {
            return andDomainIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andDomainIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " >=", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDomainIdLessThan(long value) {
            return andDomainIdLessThan(Long.valueOf(value));
        }

        public Criteria andDomainIdLessThan(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " <", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDomainIdLessThanOrEqualTo(long value) {
            return andDomainIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andDomainIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " <=", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDomainIdIn(long[] values) {
            if (values.length == 1) {
                return andDomainIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainId + " in", values,
                    "domainId");

                return this;
            }
        }

        public Criteria andDomainIdNotIn(long[] values) {
            if (values.length == 1) {
                return andDomainIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainId + " not in",
                    values, "domainId");

                return this;
            }
        }

        public Criteria andDomainIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andDomainIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainId + " in", values,
                    "domainId");

                return this;
            }
        }

        public Criteria andDomainIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andDomainIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainId + " not in",
                    values, "domainId");

                return this;
            }
        }

        public Criteria andDomainIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andDomainIdEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainId + " in",
                    Arrays.asList(values), "domainId");

                return this;
            }
        }

        public Criteria andDomainIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andDomainIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainId + " not in",
                    Arrays.asList(values), "domainId");

                return this;
            }
        }

        public Criteria andDomainIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDomainIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdBetween(long value1, long value2) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " between", value1,
                value2, "domainId");

            return this;
        }

        public Criteria andDomainIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " between", value1,
                value2, "domainId");

            return this;
        }

        public Criteria andDomainIdNotBetween(long value1, long value2) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " not between",
                value1, value2, "domainId");

            return this;
        }

        public Criteria andDomainIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysUserRoleRelateDAO.DomainId + " not between",
                value1, value2, "domainId");

            return this;
        }

        public Criteria andDomainNameIsNull() {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " is null");

            return this;
        }

        public Criteria andDomainNameIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " is not null");

            return this;
        }

        public Criteria andDomainNameIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.DomainName +
                " is not null AND " + ISysUserRoleRelateDAO.DomainName +
                " <> ''");

            return this;
        }

        public Criteria andDomainNameIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.DomainName +
                " is null OR " + ISysUserRoleRelateDAO.DomainName + " = '')");

            return this;
        }

        public Criteria andDomainNameEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " = ", value,
                "domainName");

            return this;
        }

        public Criteria andDomainNameEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainNameEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainNameNotEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " <>", value,
                "domainName");

            return this;
        }

        public Criteria andDomainNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " is null OR " +
                ISysUserRoleRelateDAO.DomainName + " <>", value, "domainName");

            return this;
        }

        public Criteria andDomainNameNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainNameNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainNameGreaterThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " >", value,
                "domainName");

            return this;
        }

        public Criteria andDomainNameGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainNameGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainNameGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " >=", value,
                "domainName");

            return this;
        }

        public Criteria andDomainNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainNameLessThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " <", value,
                "domainName");

            return this;
        }

        public Criteria andDomainNameLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainNameLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainNameLessThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " <=", value,
                "domainName");

            return this;
        }

        public Criteria andDomainNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.DomainName + " like",
                buffer.toString(), "domainName");

            return this;
        }

        public Criteria andDomainNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.DomainName + " not like",
                buffer.toString(), "domainName");

            return this;
        }

        public Criteria andDomainNameIn(List<String> values) {
            if (values.size() == 1) {
                return andDomainNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainName + " in", values,
                    "domainName");

                return this;
            }
        }

        public Criteria andDomainNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andDomainNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainName + " not in",
                    values, "domainName");

                return this;
            }
        }

        public Criteria andDomainNameIn(String[] values) {
            if (values.length == 1) {
                return andDomainNameEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainName + " in",
                    Arrays.asList(values), "domainName");

                return this;
            }
        }

        public Criteria andDomainNameNotIn(String[] values) {
            if (values.length == 1) {
                return andDomainNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainName + " not in",
                    Arrays.asList(values), "domainName");

                return this;
            }
        }

        public Criteria andDomainNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainNameNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainNameBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " between", value1,
                value2, "domainName");

            return this;
        }

        public Criteria andDomainNameNotBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.DomainName + " not between",
                value1, value2, "domainName");

            return this;
        }

        public Criteria andDomainCodeIsNull() {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " is null");

            return this;
        }

        public Criteria andDomainCodeIsNotNull() {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " is not null");

            return this;
        }

        public Criteria andDomainCodeIsNotEmpty() {
            addCriterion(ISysUserRoleRelateDAO.DomainCode +
                " is not null AND " + ISysUserRoleRelateDAO.DomainCode +
                " <> ''");

            return this;
        }

        public Criteria andDomainCodeIsEmpty() {
            addCriterion("(" + ISysUserRoleRelateDAO.DomainCode +
                " is null OR " + ISysUserRoleRelateDAO.DomainCode + " = '')");

            return this;
        }

        public Criteria andDomainCodeEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " = ", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainCode);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeNotEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " <>", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeNotEqualToOrIsNull(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " is null OR " +
                ISysUserRoleRelateDAO.DomainCode + " <>", value, "domainCode");

            return this;
        }

        public Criteria andDomainCodeNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainCode);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeGreaterThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " >", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainCode);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " >=", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainCode);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeLessThan(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " <", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainCode);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeLessThanOrEqualTo(String value) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " <=", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysUserRoleRelateDAO.DomainCode);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " like",
                buffer.toString(), "domainCode");

            return this;
        }

        public Criteria andDomainCodeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " not like",
                buffer.toString(), "domainCode");

            return this;
        }

        public Criteria andDomainCodeIn(List<String> values) {
            if (values.size() == 1) {
                return andDomainCodeEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainCode + " in", values,
                    "domainCode");

                return this;
            }
        }

        public Criteria andDomainCodeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andDomainCodeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainCode + " not in",
                    values, "domainCode");

                return this;
            }
        }

        public Criteria andDomainCodeIn(String[] values) {
            if (values.length == 1) {
                return andDomainCodeEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainCode + " in",
                    Arrays.asList(values), "domainCode");

                return this;
            }
        }

        public Criteria andDomainCodeNotIn(String[] values) {
            if (values.length == 1) {
                return andDomainCodeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysUserRoleRelateDAO.DomainCode + " not in",
                    Arrays.asList(values), "domainCode");

                return this;
            }
        }

        public Criteria andDomainCodeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " between", value1,
                value2, "domainCode");

            return this;
        }

        public Criteria andDomainCodeNotBetween(String value1, String value2) {
            addCriterion(ISysUserRoleRelateDAO.DomainCode + " not between",
                value1, value2, "domainCode");

            return this;
        }
    }
}
